package com.mysterymall.Common.Utils;

import org.slf4j.Logger;

/**
 * @Description 日志打印工具类
 * @Date 2022/1/7 10:52
 * @Created by LSH
 */
public class LogUtils{
    private static String logStart="\n[ 接口名称:[ {}() ], class:[ {} ] 开始调用 ]" +
                                   "\n[ 执行用户:[ {} ], 接口入参:{} ]";

    private static String logEnd="\n[ 接口名称:[ {}() ], class:[ {} ] 结束 ]" +
                                 "\n[ 执行用户:[ {} ], 接口返回:[{}] ,执行时间:[ {}ms ]";

    public static void startInfo(Logger log,String methodName ,String className,String handleUUID,String params){
        log.info(logStart,methodName,className,handleUUID,params);
    }

    public static void endtInfo(Logger log,String method,String className,String handleUUID,Object result,Long cost){
        log.info(logEnd,method,className,handleUUID,result,cost);
    }
}
